/* 
 * File:   FileTypeFactory.cpp
 * Author: ariel
 * 
 * Created on November 8, 2009, 3:28 AM
 */

#include "FileTypeFactory.h"

FileTypeFactory::FileTypeFactory() {
     this->plugins = EXTRACTOR_loadConfigLibraries(NULL,"libextractor_mp3.so:libextractor_ogg.so:libextractor_mime.so");
}
FileType* FileTypeFactory::categorize(std::string path) {
    EXTRACTOR_KeywordList * md_list;
    md_list = EXTRACTOR_getKeywords(plugins, path.c_str());
    EXTRACTOR_printKeywords(stdout, md_list);
    EXTRACTOR_freeKeywords(md_list);
}
FileTypeFactory::FileTypeFactory(const FileTypeFactory& orig) {


}

FileTypeFactory::~FileTypeFactory() {
    EXTRACTOR_removeAll(plugins);
}

